<template>
    <view class="page-main">
        <liu-indexed-list :dataList="dataList" @click="click"></liu-indexed-list>
    </view>
</template>

<script>
	//import {area} from "@/require/api.js";
    export default {
        data() {
            return {
                dataList: []
            }
        },
		onShow() {
		  this.getList();	
		},
        methods: {
		    async getList(){
				this.$get(this.$api.area,{level:2},res=>{
					this.dataList=res.data.data;
				});
			},
            //点击列表回调事件
            click(e) {
				getApp().globalData.city=e.name;
				this.$project.toBack();
               
            }
        }
    }
</script>
<style lang="scss" scoped>
	
</style>